import request from '@/utils/request'

export function createPurchaseOrder(purchaseOrderVo) {
  return request({
    url: '/admin/leaves/purchase-order/createPurchaseOrder',
    method: 'post',
    data: purchaseOrderVo
  })
}

export function deletePurchaseOrder(id) {
  return request({
    url: `/admin/leaves/purchase-order/deletePurchaseOrder/${id}`,
    method: 'delete'
  })
}

export function updatePurchaseOrder(purchaseOrderVo) {
  return request({
    url: '/admin/leaves/purchase-order/updatePurchaseOrder',
    method: 'put',
    data: purchaseOrderVo
  })
}

export function getPurchaseOrderList(searchObj) {
  return request({
    url: '/admin/leaves/purchase-order/getPurchaseOrderList',
    method: 'post',
    data: searchObj
  })
}

export function auditPurchaseOrder(auditOrderVo) {
  return request({
    url: '/admin/leaves/purchase-order/auditPurchaseOrder',
    method: 'post',
    data: auditOrderVo
  })
}
